package cn.itcast.scala.course03

/**
  * create by zhangtian on 2018/12/28
  */
object ScalaString {
  def main(args: Array[String]): Unit = {
    val a = "a"
    val b = "b"

    val sb = new StringBuilder
    sb += 'c'  // 字符拼接一个+

    sb ++= "defg" // 字符串拼接两个+

    println(sb.toString())

    println(hello("zhangsan"))
    println(hello2("lisi"))
  }

  def hello(name: String) = s"my name is ${name}"

  def hello2(name: String): String = {
    s"my name is ${name}"
  }
}
